package com.yayun.merchant.domain;

import com.yayun.common.annotation.Excel;
import com.yayun.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

public class AuctionItem extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @Excel(name = "拍卖ID")
    private Long id;

    @Excel(name = "商品ID")
    private Long productId;

    @Excel(name = "起拍价")
    private BigDecimal startPrice;

    @Excel(name = "当前价格")
    private BigDecimal currentPrice;

    @Excel(name = "加价幅度")
    private BigDecimal stepPrice;

    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @Excel(name = "状态", readConverterExp = "0=未开始,1=进行中,2=已结束,3=已取消")
    private Integer status;

    @Excel(name = "中标用户ID")
    private Long winnerId;

    // 关联的商品信息
    private PmsProduct product;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setStartPrice(BigDecimal startPrice) {
        this.startPrice = startPrice;
    }

    public BigDecimal getStartPrice() {
        return startPrice;
    }

    public void setCurrentPrice(BigDecimal currentPrice) {
        this.currentPrice = currentPrice;
    }

    public BigDecimal getCurrentPrice() {
        return currentPrice;
    }

    public void setStepPrice(BigDecimal stepPrice) {
        this.stepPrice = stepPrice;
    }

    public BigDecimal getStepPrice() {
        return stepPrice;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void setWinnerId(Long winnerId) {
        this.winnerId = winnerId;
    }

    public Long getWinnerId() {
        return winnerId;
    }

    public PmsProduct getProduct() {
        return product;
    }

    public void setProduct(PmsProduct product) {
        this.product = product;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("productId", getProductId())
                .append("startPrice", getStartPrice())
                .append("currentPrice", getCurrentPrice())
                .append("stepPrice", getStepPrice())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("status", getStatus())
                .append("winnerId", getWinnerId())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
} 